package mySwingToolkit.model;

/**
 * 放在table中的第一个隐藏列
 * 
 * @author hxd
 *
 * @param <T>
 */
public class ClassModel<T> {

	/**
	 * 对象
	 */
	T object;
	/**
	 * 状态
	 */
	int status=0;
	public final static int NORMAL=0;
	public final static int UPDATE=2;
	public final static int DELETE=-1;
	public final static int INSERT=1;
	public ClassModel(T object) {
		super();
		this.object = object;
		this.status=NORMAL;
	}
	public T getObject() {
		return object;
	}
	public void setObject(T object) {
		this.object = object;
	}
	public void markUpdate(){
		this.status=UPDATE;
	}
	public void markDelete(){
		this.status=DELETE;
	}
	public void markInsert(){
		this.status=INSERT;
	}
	public  int getStatus(){
		return this.status;
	}
	@Override
	public String toString() {
		return "ClassModel [object=" + object + ", status=" + status + "]";
	}
}
